﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Krile.Kernel.Control;
using Twinkle.Searchs;

namespace Twinkle.Controls
{
    public partial class UserSet : SDataArgSetUI
    {
        ISearchTwitterAccountTarget target;
        public UserSet(ISearchTwitterAccountTarget atg)
        {
            target = atg;
            InitializeComponent();
            this.accountsList.Items.AddRange(
                (from a in Kernel.Config.Accounts select a.UserId).ToArray());
            this.accountsList.Text = atg.TargetAccountId;
        }

        public override void Accepted()
        {
            target.TargetAccountId = this.accountsList.Text;
        }
    }
}
